using GLib;

namespace Hum
{
	public class Track
	{
		public string uri;
		public bool status;
		public string title;
		public string artist;
		public string album;
		public int track_number;
		public string release_date;
		public string genre;
		public int64 duration; // the track length in nanoseconds
		public string codec;
	}
	
	public class Playlist
	{
		public List<Track> list;
		public string type; // the playlist type (i.e. tag-, file- or search-based)
		public Track active; // the currently selected track, if any
		
		public void populate ()
		{
			for (int i = 0; i < 10; ++i)
			{
				var temp = new Track ();
				temp.uri = i.to_string ();
				list.append (temp);
			}
		}
		
		static int main (string[] args)
		{
			var pl = new Playlist ();
			pl.populate ();
			
			for (int i = 0; i < 10; ++i)
			{
				var temp = pl.list.nth_data (i);
				stdout.printf ("%s\n", temp.uri);
			}
		}
	}
}
